/*
 * create by straysnail
 * 2022/2/26
 */
#define waterPin A0  //定义水滴传感器的IO口为 A0
int waterVal = 0;

void setup() {
  Serial.begin(9600);  //设置串口通讯的波特率为9600
  pinMode(waterPin,INPUT);  //设置为输入
}

void loop() {
  waterVal = analogRead(waterPin);  //读取水滴传感器读取到的模拟值
  Serial.print("waterVal = ");
  Serial.println(waterVal);  //换行打印水滴传感器检测到的值
  //delay(200); //延时，调整串口打印速度
}
